package javabase.pojo;

import java.util.List;
import java.util.Objects;

/**
 * @Auther: luzhanshi
 * @Date: 2021/2/2 - 02 - 02 - 15:59 
 * @Description: pojo
 * @version: 1.0
 */
public class Student {
    String name;
    int age;
    float score;
    List<String> habby;

    public Student() {
    }

    public Student(String name, int age, float score, List<String> habby) {
        this.name = name;
        this.age = age;
        this.score = score;
        this.habby = habby;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", score=" + score +
                ", habby=" + habby +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return age == student.age &&
                Float.compare(student.score, score) == 0 &&
                Objects.equals(name, student.name) &&
                Objects.equals(habby, student.habby);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, age, score, habby);
    }



}
